
// Generated from complexCalculator.g4 by ANTLR 4.9


#include "complexCalculatorVisitor.h"

#include "complexCalculatorParser.h"


using namespace antlrcpp;
using namespace antlr4;

complexCalculatorParser::complexCalculatorParser(TokenStream *input) : Parser(input) {
  _interpreter = new atn::ParserATNSimulator(this, _atn, _decisionToDFA, _sharedContextCache);
}

complexCalculatorParser::~complexCalculatorParser() {
  delete _interpreter;
}

std::string complexCalculatorParser::getGrammarFileName() const {
  return "complexCalculator.g4";
}

const std::vector<std::string>& complexCalculatorParser::getRuleNames() const {
  return _ruleNames;
}

dfa::Vocabulary& complexCalculatorParser::getVocabulary() const {
  return _vocabulary;
}


//----------------- UnitContext ------------------------------------------------------------------

complexCalculatorParser::UnitContext::UnitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::UnitContext::EOF() {
  return getToken(complexCalculatorParser::EOF, 0);
}

std::vector<complexCalculatorParser::DefUnitContext *> complexCalculatorParser::UnitContext::defUnit() {
  return getRuleContexts<complexCalculatorParser::DefUnitContext>();
}

complexCalculatorParser::DefUnitContext* complexCalculatorParser::UnitContext::defUnit(size_t i) {
  return getRuleContext<complexCalculatorParser::DefUnitContext>(i);
}

std::vector<complexCalculatorParser::StatContext *> complexCalculatorParser::UnitContext::stat() {
  return getRuleContexts<complexCalculatorParser::StatContext>();
}

complexCalculatorParser::StatContext* complexCalculatorParser::UnitContext::stat(size_t i) {
  return getRuleContext<complexCalculatorParser::StatContext>(i);
}


size_t complexCalculatorParser::UnitContext::getRuleIndex() const {
  return complexCalculatorParser::RuleUnit;
}


antlrcpp::Any complexCalculatorParser::UnitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitUnit(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::UnitContext* complexCalculatorParser::unit() {
  UnitContext *_localctx = _tracker.createInstance<UnitContext>(_ctx, getState());
  enterRule(_localctx, 0, complexCalculatorParser::RuleUnit);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(34);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << complexCalculatorParser::T__1)
      | (1ULL << complexCalculatorParser::Int)
      | (1ULL << complexCalculatorParser::Float)
      | (1ULL << complexCalculatorParser::Lparen)
      | (1ULL << complexCalculatorParser::Plus)
      | (1ULL << complexCalculatorParser::Minus)
      | (1ULL << complexCalculatorParser::INT)
      | (1ULL << complexCalculatorParser::FLOAT)
      | (1ULL << complexCalculatorParser::Identifier))) != 0)) {
      setState(32);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case complexCalculatorParser::Int:
        case complexCalculatorParser::Float: {
          setState(30);
          defUnit();
          break;
        }

        case complexCalculatorParser::T__1:
        case complexCalculatorParser::Lparen:
        case complexCalculatorParser::Plus:
        case complexCalculatorParser::Minus:
        case complexCalculatorParser::INT:
        case complexCalculatorParser::FLOAT:
        case complexCalculatorParser::Identifier: {
          setState(31);
          stat();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(36);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(37);
    match(complexCalculatorParser::EOF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DefUnitContext ------------------------------------------------------------------

complexCalculatorParser::DefUnitContext::DefUnitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

complexCalculatorParser::VarUnitContext* complexCalculatorParser::DefUnitContext::varUnit() {
  return getRuleContext<complexCalculatorParser::VarUnitContext>(0);
}


size_t complexCalculatorParser::DefUnitContext::getRuleIndex() const {
  return complexCalculatorParser::RuleDefUnit;
}


antlrcpp::Any complexCalculatorParser::DefUnitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitDefUnit(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::DefUnitContext* complexCalculatorParser::defUnit() {
  DefUnitContext *_localctx = _tracker.createInstance<DefUnitContext>(_ctx, getState());
  enterRule(_localctx, 2, complexCalculatorParser::RuleDefUnit);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(39);
    varUnit();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VarUnitContext ------------------------------------------------------------------

complexCalculatorParser::VarUnitContext::VarUnitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

complexCalculatorParser::TypeContext* complexCalculatorParser::VarUnitContext::type() {
  return getRuleContext<complexCalculatorParser::TypeContext>(0);
}

std::vector<complexCalculatorParser::VarDefContext *> complexCalculatorParser::VarUnitContext::varDef() {
  return getRuleContexts<complexCalculatorParser::VarDefContext>();
}

complexCalculatorParser::VarDefContext* complexCalculatorParser::VarUnitContext::varDef(size_t i) {
  return getRuleContext<complexCalculatorParser::VarDefContext>(i);
}


size_t complexCalculatorParser::VarUnitContext::getRuleIndex() const {
  return complexCalculatorParser::RuleVarUnit;
}


antlrcpp::Any complexCalculatorParser::VarUnitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitVarUnit(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::VarUnitContext* complexCalculatorParser::varUnit() {
  VarUnitContext *_localctx = _tracker.createInstance<VarUnitContext>(_ctx, getState());
  enterRule(_localctx, 4, complexCalculatorParser::RuleVarUnit);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(41);
    type();
    setState(42);
    varDef();
    setState(47);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == complexCalculatorParser::T__0) {
      setState(43);
      match(complexCalculatorParser::T__0);
      setState(44);
      varDef();
      setState(49);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(50);
    match(complexCalculatorParser::T__1);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TypeContext ------------------------------------------------------------------

complexCalculatorParser::TypeContext::TypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::TypeContext::Int() {
  return getToken(complexCalculatorParser::Int, 0);
}

tree::TerminalNode* complexCalculatorParser::TypeContext::Float() {
  return getToken(complexCalculatorParser::Float, 0);
}


size_t complexCalculatorParser::TypeContext::getRuleIndex() const {
  return complexCalculatorParser::RuleType;
}


antlrcpp::Any complexCalculatorParser::TypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitType(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::TypeContext* complexCalculatorParser::type() {
  TypeContext *_localctx = _tracker.createInstance<TypeContext>(_ctx, getState());
  enterRule(_localctx, 6, complexCalculatorParser::RuleType);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(52);
    _la = _input->LA(1);
    if (!(_la == complexCalculatorParser::Int

    || _la == complexCalculatorParser::Float)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VarDefContext ------------------------------------------------------------------

complexCalculatorParser::VarDefContext::VarDefContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::VarDefContext::Identifier() {
  return getToken(complexCalculatorParser::Identifier, 0);
}

complexCalculatorParser::InitValContext* complexCalculatorParser::VarDefContext::initVal() {
  return getRuleContext<complexCalculatorParser::InitValContext>(0);
}


size_t complexCalculatorParser::VarDefContext::getRuleIndex() const {
  return complexCalculatorParser::RuleVarDef;
}


antlrcpp::Any complexCalculatorParser::VarDefContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitVarDef(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::VarDefContext* complexCalculatorParser::varDef() {
  VarDefContext *_localctx = _tracker.createInstance<VarDefContext>(_ctx, getState());
  enterRule(_localctx, 8, complexCalculatorParser::RuleVarDef);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(58);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 3, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(54);
      match(complexCalculatorParser::Identifier);
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(55);
      match(complexCalculatorParser::Identifier);
      setState(56);
      match(complexCalculatorParser::T__2);
      setState(57);
      initVal();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- InitValContext ------------------------------------------------------------------

complexCalculatorParser::InitValContext::InitValContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

complexCalculatorParser::ExpContext* complexCalculatorParser::InitValContext::exp() {
  return getRuleContext<complexCalculatorParser::ExpContext>(0);
}


size_t complexCalculatorParser::InitValContext::getRuleIndex() const {
  return complexCalculatorParser::RuleInitVal;
}


antlrcpp::Any complexCalculatorParser::InitValContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitInitVal(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::InitValContext* complexCalculatorParser::initVal() {
  InitValContext *_localctx = _tracker.createInstance<InitValContext>(_ctx, getState());
  enterRule(_localctx, 10, complexCalculatorParser::RuleInitVal);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(60);
    exp(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StatContext ------------------------------------------------------------------

complexCalculatorParser::StatContext::StatContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t complexCalculatorParser::StatContext::getRuleIndex() const {
  return complexCalculatorParser::RuleStat;
}

void complexCalculatorParser::StatContext::copyFrom(StatContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- StatExpContext ------------------------------------------------------------------

complexCalculatorParser::ExpContext* complexCalculatorParser::StatExpContext::exp() {
  return getRuleContext<complexCalculatorParser::ExpContext>(0);
}

complexCalculatorParser::StatExpContext::StatExpContext(StatContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::StatExpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitStatExp(this);
  else
    return visitor->visitChildren(this);
}
//----------------- StatAssignContext ------------------------------------------------------------------

complexCalculatorParser::LValContext* complexCalculatorParser::StatAssignContext::lVal() {
  return getRuleContext<complexCalculatorParser::LValContext>(0);
}

complexCalculatorParser::ExpContext* complexCalculatorParser::StatAssignContext::exp() {
  return getRuleContext<complexCalculatorParser::ExpContext>(0);
}

complexCalculatorParser::StatAssignContext::StatAssignContext(StatContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::StatAssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitStatAssign(this);
  else
    return visitor->visitChildren(this);
}
complexCalculatorParser::StatContext* complexCalculatorParser::stat() {
  StatContext *_localctx = _tracker.createInstance<StatContext>(_ctx, getState());
  enterRule(_localctx, 12, complexCalculatorParser::RuleStat);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(71);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 5, _ctx)) {
    case 1: {
      _localctx = dynamic_cast<StatContext *>(_tracker.createInstance<complexCalculatorParser::StatAssignContext>(_localctx));
      enterOuterAlt(_localctx, 1);
      setState(62);
      lVal();
      setState(63);
      match(complexCalculatorParser::T__2);
      setState(64);
      exp(0);
      setState(65);
      match(complexCalculatorParser::T__1);
      break;
    }

    case 2: {
      _localctx = dynamic_cast<StatContext *>(_tracker.createInstance<complexCalculatorParser::StatExpContext>(_localctx));
      enterOuterAlt(_localctx, 2);
      setState(68);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & ((1ULL << complexCalculatorParser::Lparen)
        | (1ULL << complexCalculatorParser::Plus)
        | (1ULL << complexCalculatorParser::Minus)
        | (1ULL << complexCalculatorParser::INT)
        | (1ULL << complexCalculatorParser::FLOAT)
        | (1ULL << complexCalculatorParser::Identifier))) != 0)) {
        setState(67);
        exp(0);
      }
      setState(70);
      match(complexCalculatorParser::T__1);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LValContext ------------------------------------------------------------------

complexCalculatorParser::LValContext::LValContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::LValContext::Identifier() {
  return getToken(complexCalculatorParser::Identifier, 0);
}


size_t complexCalculatorParser::LValContext::getRuleIndex() const {
  return complexCalculatorParser::RuleLVal;
}


antlrcpp::Any complexCalculatorParser::LValContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitLVal(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::LValContext* complexCalculatorParser::lVal() {
  LValContext *_localctx = _tracker.createInstance<LValContext>(_ctx, getState());
  enterRule(_localctx, 14, complexCalculatorParser::RuleLVal);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(73);
    match(complexCalculatorParser::Identifier);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExpContext ------------------------------------------------------------------

complexCalculatorParser::ExpContext::ExpContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t complexCalculatorParser::ExpContext::getRuleIndex() const {
  return complexCalculatorParser::RuleExp;
}

void complexCalculatorParser::ExpContext::copyFrom(ExpContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- ExpUnaryContext ------------------------------------------------------------------

complexCalculatorParser::OpUnaryContext* complexCalculatorParser::ExpUnaryContext::opUnary() {
  return getRuleContext<complexCalculatorParser::OpUnaryContext>(0);
}

complexCalculatorParser::ExpContext* complexCalculatorParser::ExpUnaryContext::exp() {
  return getRuleContext<complexCalculatorParser::ExpContext>(0);
}

complexCalculatorParser::ExpUnaryContext::ExpUnaryContext(ExpContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::ExpUnaryContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitExpUnary(this);
  else
    return visitor->visitChildren(this);
}
//----------------- IdentifierContext ------------------------------------------------------------------

tree::TerminalNode* complexCalculatorParser::IdentifierContext::Identifier() {
  return getToken(complexCalculatorParser::Identifier, 0);
}

complexCalculatorParser::IdentifierContext::IdentifierContext(ExpContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::IdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitIdentifier(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ExpNumberContext ------------------------------------------------------------------

complexCalculatorParser::NumberContext* complexCalculatorParser::ExpNumberContext::number() {
  return getRuleContext<complexCalculatorParser::NumberContext>(0);
}

complexCalculatorParser::ExpNumberContext::ExpNumberContext(ExpContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::ExpNumberContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitExpNumber(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ExpPowContext ------------------------------------------------------------------

std::vector<complexCalculatorParser::ExpContext *> complexCalculatorParser::ExpPowContext::exp() {
  return getRuleContexts<complexCalculatorParser::ExpContext>();
}

complexCalculatorParser::ExpContext* complexCalculatorParser::ExpPowContext::exp(size_t i) {
  return getRuleContext<complexCalculatorParser::ExpContext>(i);
}

tree::TerminalNode* complexCalculatorParser::ExpPowContext::OpPow() {
  return getToken(complexCalculatorParser::OpPow, 0);
}

complexCalculatorParser::ExpPowContext::ExpPowContext(ExpContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::ExpPowContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitExpPow(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ExpMulDivContext ------------------------------------------------------------------

std::vector<complexCalculatorParser::ExpContext *> complexCalculatorParser::ExpMulDivContext::exp() {
  return getRuleContexts<complexCalculatorParser::ExpContext>();
}

complexCalculatorParser::ExpContext* complexCalculatorParser::ExpMulDivContext::exp(size_t i) {
  return getRuleContext<complexCalculatorParser::ExpContext>(i);
}

complexCalculatorParser::OpMulDivContext* complexCalculatorParser::ExpMulDivContext::opMulDiv() {
  return getRuleContext<complexCalculatorParser::OpMulDivContext>(0);
}

complexCalculatorParser::ExpMulDivContext::ExpMulDivContext(ExpContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::ExpMulDivContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitExpMulDiv(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ExpParenContext ------------------------------------------------------------------

tree::TerminalNode* complexCalculatorParser::ExpParenContext::Lparen() {
  return getToken(complexCalculatorParser::Lparen, 0);
}

complexCalculatorParser::ExpContext* complexCalculatorParser::ExpParenContext::exp() {
  return getRuleContext<complexCalculatorParser::ExpContext>(0);
}

tree::TerminalNode* complexCalculatorParser::ExpParenContext::Rparen() {
  return getToken(complexCalculatorParser::Rparen, 0);
}

complexCalculatorParser::ExpParenContext::ExpParenContext(ExpContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::ExpParenContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitExpParen(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ExpAddSubContext ------------------------------------------------------------------

std::vector<complexCalculatorParser::ExpContext *> complexCalculatorParser::ExpAddSubContext::exp() {
  return getRuleContexts<complexCalculatorParser::ExpContext>();
}

complexCalculatorParser::ExpContext* complexCalculatorParser::ExpAddSubContext::exp(size_t i) {
  return getRuleContext<complexCalculatorParser::ExpContext>(i);
}

complexCalculatorParser::OpAddSubContext* complexCalculatorParser::ExpAddSubContext::opAddSub() {
  return getRuleContext<complexCalculatorParser::OpAddSubContext>(0);
}

complexCalculatorParser::ExpAddSubContext::ExpAddSubContext(ExpContext *ctx) { copyFrom(ctx); }


antlrcpp::Any complexCalculatorParser::ExpAddSubContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitExpAddSub(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::ExpContext* complexCalculatorParser::exp() {
   return exp(0);
}

complexCalculatorParser::ExpContext* complexCalculatorParser::exp(int precedence) {
  ParserRuleContext *parentContext = _ctx;
  size_t parentState = getState();
  complexCalculatorParser::ExpContext *_localctx = _tracker.createInstance<ExpContext>(_ctx, parentState);
  complexCalculatorParser::ExpContext *previousContext = _localctx;
  (void)previousContext; // Silence compiler, in case the context is not used by generated code.
  size_t startState = 16;
  enterRecursionRule(_localctx, 16, complexCalculatorParser::RuleExp, precedence);

    

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    unrollRecursionContexts(parentContext);
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(85);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case complexCalculatorParser::INT:
      case complexCalculatorParser::FLOAT: {
        _localctx = _tracker.createInstance<ExpNumberContext>(_localctx);
        _ctx = _localctx;
        previousContext = _localctx;

        setState(76);
        number();
        break;
      }

      case complexCalculatorParser::Lparen: {
        _localctx = _tracker.createInstance<ExpParenContext>(_localctx);
        _ctx = _localctx;
        previousContext = _localctx;
        setState(77);
        match(complexCalculatorParser::Lparen);
        setState(78);
        exp(0);
        setState(79);
        match(complexCalculatorParser::Rparen);
        break;
      }

      case complexCalculatorParser::Plus:
      case complexCalculatorParser::Minus: {
        _localctx = _tracker.createInstance<ExpUnaryContext>(_localctx);
        _ctx = _localctx;
        previousContext = _localctx;
        setState(81);
        opUnary();
        setState(82);
        exp(4);
        break;
      }

      case complexCalculatorParser::Identifier: {
        _localctx = _tracker.createInstance<IdentifierContext>(_localctx);
        _ctx = _localctx;
        previousContext = _localctx;
        setState(84);
        match(complexCalculatorParser::Identifier);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
    _ctx->stop = _input->LT(-1);
    setState(100);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        if (!_parseListeners.empty())
          triggerExitRuleEvent();
        previousContext = _localctx;
        setState(98);
        _errHandler->sync(this);
        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 7, _ctx)) {
        case 1: {
          auto newContext = _tracker.createInstance<ExpPowContext>(_tracker.createInstance<ExpContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExp);
          setState(87);

          if (!(precpred(_ctx, 5))) throw FailedPredicateException(this, "precpred(_ctx, 5)");
          setState(88);
          match(complexCalculatorParser::OpPow);
          setState(89);
          exp(5);
          break;
        }

        case 2: {
          auto newContext = _tracker.createInstance<ExpMulDivContext>(_tracker.createInstance<ExpContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExp);
          setState(90);

          if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)");
          setState(91);
          opMulDiv();
          setState(92);
          exp(4);
          break;
        }

        case 3: {
          auto newContext = _tracker.createInstance<ExpAddSubContext>(_tracker.createInstance<ExpContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleExp);
          setState(94);

          if (!(precpred(_ctx, 2))) throw FailedPredicateException(this, "precpred(_ctx, 2)");
          setState(95);
          opAddSub();
          setState(96);
          exp(3);
          break;
        }

        default:
          break;
        } 
      }
      setState(102);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx);
    }
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }
  return _localctx;
}

//----------------- NumberContext ------------------------------------------------------------------

complexCalculatorParser::NumberContext::NumberContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::NumberContext::INT() {
  return getToken(complexCalculatorParser::INT, 0);
}

tree::TerminalNode* complexCalculatorParser::NumberContext::FLOAT() {
  return getToken(complexCalculatorParser::FLOAT, 0);
}


size_t complexCalculatorParser::NumberContext::getRuleIndex() const {
  return complexCalculatorParser::RuleNumber;
}


antlrcpp::Any complexCalculatorParser::NumberContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitNumber(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::NumberContext* complexCalculatorParser::number() {
  NumberContext *_localctx = _tracker.createInstance<NumberContext>(_ctx, getState());
  enterRule(_localctx, 18, complexCalculatorParser::RuleNumber);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(103);
    _la = _input->LA(1);
    if (!(_la == complexCalculatorParser::INT

    || _la == complexCalculatorParser::FLOAT)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OpUnaryContext ------------------------------------------------------------------

complexCalculatorParser::OpUnaryContext::OpUnaryContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::OpUnaryContext::Plus() {
  return getToken(complexCalculatorParser::Plus, 0);
}

tree::TerminalNode* complexCalculatorParser::OpUnaryContext::Minus() {
  return getToken(complexCalculatorParser::Minus, 0);
}


size_t complexCalculatorParser::OpUnaryContext::getRuleIndex() const {
  return complexCalculatorParser::RuleOpUnary;
}


antlrcpp::Any complexCalculatorParser::OpUnaryContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitOpUnary(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::OpUnaryContext* complexCalculatorParser::opUnary() {
  OpUnaryContext *_localctx = _tracker.createInstance<OpUnaryContext>(_ctx, getState());
  enterRule(_localctx, 20, complexCalculatorParser::RuleOpUnary);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(105);
    _la = _input->LA(1);
    if (!(_la == complexCalculatorParser::Plus

    || _la == complexCalculatorParser::Minus)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OpMulDivContext ------------------------------------------------------------------

complexCalculatorParser::OpMulDivContext::OpMulDivContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::OpMulDivContext::Mul() {
  return getToken(complexCalculatorParser::Mul, 0);
}

tree::TerminalNode* complexCalculatorParser::OpMulDivContext::Div() {
  return getToken(complexCalculatorParser::Div, 0);
}


size_t complexCalculatorParser::OpMulDivContext::getRuleIndex() const {
  return complexCalculatorParser::RuleOpMulDiv;
}


antlrcpp::Any complexCalculatorParser::OpMulDivContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitOpMulDiv(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::OpMulDivContext* complexCalculatorParser::opMulDiv() {
  OpMulDivContext *_localctx = _tracker.createInstance<OpMulDivContext>(_ctx, getState());
  enterRule(_localctx, 22, complexCalculatorParser::RuleOpMulDiv);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(107);
    _la = _input->LA(1);
    if (!(_la == complexCalculatorParser::Mul

    || _la == complexCalculatorParser::Div)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OpAddSubContext ------------------------------------------------------------------

complexCalculatorParser::OpAddSubContext::OpAddSubContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* complexCalculatorParser::OpAddSubContext::Plus() {
  return getToken(complexCalculatorParser::Plus, 0);
}

tree::TerminalNode* complexCalculatorParser::OpAddSubContext::Minus() {
  return getToken(complexCalculatorParser::Minus, 0);
}


size_t complexCalculatorParser::OpAddSubContext::getRuleIndex() const {
  return complexCalculatorParser::RuleOpAddSub;
}


antlrcpp::Any complexCalculatorParser::OpAddSubContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitOpAddSub(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::OpAddSubContext* complexCalculatorParser::opAddSub() {
  OpAddSubContext *_localctx = _tracker.createInstance<OpAddSubContext>(_ctx, getState());
  enterRule(_localctx, 24, complexCalculatorParser::RuleOpAddSub);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(109);
    _la = _input->LA(1);
    if (!(_la == complexCalculatorParser::Plus

    || _la == complexCalculatorParser::Minus)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FuncRParamsContext ------------------------------------------------------------------

complexCalculatorParser::FuncRParamsContext::FuncRParamsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<complexCalculatorParser::FuncRParamContext *> complexCalculatorParser::FuncRParamsContext::funcRParam() {
  return getRuleContexts<complexCalculatorParser::FuncRParamContext>();
}

complexCalculatorParser::FuncRParamContext* complexCalculatorParser::FuncRParamsContext::funcRParam(size_t i) {
  return getRuleContext<complexCalculatorParser::FuncRParamContext>(i);
}


size_t complexCalculatorParser::FuncRParamsContext::getRuleIndex() const {
  return complexCalculatorParser::RuleFuncRParams;
}


antlrcpp::Any complexCalculatorParser::FuncRParamsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitFuncRParams(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::FuncRParamsContext* complexCalculatorParser::funcRParams() {
  FuncRParamsContext *_localctx = _tracker.createInstance<FuncRParamsContext>(_ctx, getState());
  enterRule(_localctx, 26, complexCalculatorParser::RuleFuncRParams);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(111);
    funcRParam();
    setState(116);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == complexCalculatorParser::T__0) {
      setState(112);
      match(complexCalculatorParser::T__0);
      setState(113);
      funcRParam();
      setState(118);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FuncRParamContext ------------------------------------------------------------------

complexCalculatorParser::FuncRParamContext::FuncRParamContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

complexCalculatorParser::ExpContext* complexCalculatorParser::FuncRParamContext::exp() {
  return getRuleContext<complexCalculatorParser::ExpContext>(0);
}


size_t complexCalculatorParser::FuncRParamContext::getRuleIndex() const {
  return complexCalculatorParser::RuleFuncRParam;
}


antlrcpp::Any complexCalculatorParser::FuncRParamContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<complexCalculatorVisitor*>(visitor))
    return parserVisitor->visitFuncRParam(this);
  else
    return visitor->visitChildren(this);
}

complexCalculatorParser::FuncRParamContext* complexCalculatorParser::funcRParam() {
  FuncRParamContext *_localctx = _tracker.createInstance<FuncRParamContext>(_ctx, getState());
  enterRule(_localctx, 28, complexCalculatorParser::RuleFuncRParam);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(119);
    exp(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

bool complexCalculatorParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) {
  switch (ruleIndex) {
    case 8: return expSempred(dynamic_cast<ExpContext *>(context), predicateIndex);

  default:
    break;
  }
  return true;
}

bool complexCalculatorParser::expSempred(ExpContext *_localctx, size_t predicateIndex) {
  switch (predicateIndex) {
    case 0: return precpred(_ctx, 5);
    case 1: return precpred(_ctx, 3);
    case 2: return precpred(_ctx, 2);

  default:
    break;
  }
  return true;
}

// Static vars and initialization.
std::vector<dfa::DFA> complexCalculatorParser::_decisionToDFA;
atn::PredictionContextCache complexCalculatorParser::_sharedContextCache;

// We own the ATN which in turn owns the ATN states.
atn::ATN complexCalculatorParser::_atn;
std::vector<uint16_t> complexCalculatorParser::_serializedATN;

std::vector<std::string> complexCalculatorParser::_ruleNames = {
  "unit", "defUnit", "varUnit", "type", "varDef", "initVal", "stat", "lVal", 
  "exp", "number", "opUnary", "opMulDiv", "opAddSub", "funcRParams", "funcRParam"
};

std::vector<std::string> complexCalculatorParser::_literalNames = {
  "", "','", "';'", "'='", "'int'", "'float'", "'^'", "'('", "')'", "'+'", 
  "'-'", "'*'", "'/'"
};

std::vector<std::string> complexCalculatorParser::_symbolicNames = {
  "", "", "", "", "Int", "Float", "OpPow", "Lparen", "Rparen", "Plus", "Minus", 
  "Mul", "Div", "INT", "FLOAT", "Identifier", "WS"
};

dfa::Vocabulary complexCalculatorParser::_vocabulary(_literalNames, _symbolicNames);

std::vector<std::string> complexCalculatorParser::_tokenNames;

complexCalculatorParser::Initializer::Initializer() {
	for (size_t i = 0; i < _symbolicNames.size(); ++i) {
		std::string name = _vocabulary.getLiteralName(i);
		if (name.empty()) {
			name = _vocabulary.getSymbolicName(i);
		}

		if (name.empty()) {
			_tokenNames.push_back("<INVALID>");
		} else {
      _tokenNames.push_back(name);
    }
	}

  _serializedATN = {
    0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, 
    0x3, 0x12, 0x7c, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 0x9, 
    0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 0x9, 0x7, 0x4, 
    0x8, 0x9, 0x8, 0x4, 0x9, 0x9, 0x9, 0x4, 0xa, 0x9, 0xa, 0x4, 0xb, 0x9, 
    0xb, 0x4, 0xc, 0x9, 0xc, 0x4, 0xd, 0x9, 0xd, 0x4, 0xe, 0x9, 0xe, 0x4, 
    0xf, 0x9, 0xf, 0x4, 0x10, 0x9, 0x10, 0x3, 0x2, 0x3, 0x2, 0x7, 0x2, 0x23, 
    0xa, 0x2, 0xc, 0x2, 0xe, 0x2, 0x26, 0xb, 0x2, 0x3, 0x2, 0x3, 0x2, 0x3, 
    0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x7, 0x4, 0x30, 
    0xa, 0x4, 0xc, 0x4, 0xe, 0x4, 0x33, 0xb, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 
    0x5, 0x3, 0x5, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 0x5, 0x6, 0x3d, 
    0xa, 0x6, 0x3, 0x7, 0x3, 0x7, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 
    0x3, 0x8, 0x3, 0x8, 0x5, 0x8, 0x47, 0xa, 0x8, 0x3, 0x8, 0x5, 0x8, 0x4a, 
    0xa, 0x8, 0x3, 0x9, 0x3, 0x9, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 
    0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3,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, 0x5, 0x1e, 0x10, 0x2, 0x74, 0x72, 0x3, 0x2, 0x2, 0x2, 0x75, 
    0x78, 0x3, 0x2, 0x2, 0x2, 0x76, 0x74, 0x3, 0x2, 0x2, 0x2, 0x76, 0x77, 
    0x3, 0x2, 0x2, 0x2, 0x77, 0x1d, 0x3, 0x2, 0x2, 0x2, 0x78, 0x76, 0x3, 
    0x2, 0x2, 0x2, 0x79, 0x7a, 0x5, 0x12, 0xa, 0x2, 0x7a, 0x1f, 0x3, 0x2, 
    0x2, 0x2, 0xc, 0x22, 0x24, 0x31, 0x3c, 0x46, 0x49, 0x57, 0x64, 0x66, 
    0x76, 
  };

  atn::ATNDeserializer deserializer;
  _atn = deserializer.deserialize(_serializedATN);

  size_t count = _atn.getNumberOfDecisions();
  _decisionToDFA.reserve(count);
  for (size_t i = 0; i < count; i++) { 
    _decisionToDFA.emplace_back(_atn.getDecisionState(i), i);
  }
}

complexCalculatorParser::Initializer complexCalculatorParser::_init;
